<!--
/**
* Author: gaohui
* Date: 2023-03-07 17:42
* Desc: MyTable 自定义table组件
*/
-->

<template>
  <el-table border style="width: 100%">
    <slot />
    <template #append>
      <slot name="append" />
    </template>
    <template #empty>
      <slot name="empty" />
    </template>
  </el-table>
</template>

<script name="MyTable" lang="ts" setup>
import { computed, PropType } from "vue";

const props = defineProps({
  list: {
    type: Array as PropType<any[]>,
    default: () => {
      return [];
    },
  },
});

const getList = computed(() => {
  return props?.list || [];
});
</script>
<style lang="scss" scoped></style>
